package com.sendi.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Department entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "department")
public class Department implements java.io.Serializable {

	// Fields

	private Integer id;
	private String departcode;
	private String departname;
	private String departtype;
	private Integer parentid;
	private String departarea;
	private String departstatus;
	private String departdesc;

	// Constructors

	/** default constructor */
	public Department() {
	}

	/** full constructor */
	public Department(String departcode, String departname, String departtype,
			Integer parentid, String departarea, String departstatus,
			String departdesc) {
		this.departcode = departcode;
		this.departname = departname;
		this.departtype = departtype;
		this.parentid = parentid;
		this.departarea = departarea;
		this.departstatus = departstatus;
		this.departdesc = departdesc;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "departcode", length = 100)
	public String getDepartcode() {
		return this.departcode;
	}

	public void setDepartcode(String departcode) {
		this.departcode = departcode;
	}

	@Column(name = "departname", length = 100)
	public String getDepartname() {
		return this.departname;
	}

	public void setDepartname(String departname) {
		this.departname = departname;
	}

	@Column(name = "departtype", length = 50)
	public String getDeparttype() {
		return this.departtype;
	}

	public void setDeparttype(String departtype) {
		this.departtype = departtype;
	}

	@Column(name = "parentid")
	public Integer getParentid() {
		return this.parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	@Column(name = "departarea", length = 200)
	public String getDepartarea() {
		return this.departarea;
	}

	public void setDepartarea(String departarea) {
		this.departarea = departarea;
	}

	@Column(name = "departstatus", length = 20)
	public String getDepartstatus() {
		return this.departstatus;
	}

	public void setDepartstatus(String departstatus) {
		this.departstatus = departstatus;
	}

	@Column(name = "departdesc", length = 200)
	public String getDepartdesc() {
		return this.departdesc;
	}

	public void setDepartdesc(String departdesc) {
		this.departdesc = departdesc;
	}

}